package com.azt.novel.book.controller;


import com.azt.novel.book.dto.resp.BookContentAboutRespDto;
import com.azt.novel.book.service.IBookContentService;
import com.azt.novel.common.resp.RestResp;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 小说内容 前端控制器
 * </p>
 *
 * @author azt
 * @since 2023-12-02
 */
@RestController
@RequestMapping("/api/front/book")
public class BookContentController {

    @Resource
    private IBookContentService bookContentService;



    @Operation(summary = "小说内容相关信息查询接口")
    @GetMapping("/content/{chapterId}")
    public RestResp<BookContentAboutRespDto> getBookContent(
            @Parameter(description = "章节ID")@PathVariable("chapterId")Long chapterId){
        return bookContentService.getBookContent(chapterId);
    }

}
